## API Report File for "@backstage/catalog-model"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { JsonObject } from '@backstage/types';

// @public
export const ANNOTATION_EDIT_URL = 'backstage.io/edit-url';

// @public @deprecated
export const ANNOTATION_KUBERNETES_API_SERVER = 'kubernetes.io/api-server';

// @public @deprecated
export const ANNOTATION_KUBERNETES_API_SERVER_CA =
  'kubernetes.io/api-server-certificate-authority';

// @public @deprecated
export const ANNOTATION_KUBERNETES_AUTH_PROVIDER =
  'kubernetes.io/auth-provider';

// @public
export const ANNOTATION_LOCATION = 'backstage.io/managed-by-location';

// @public
export const ANNOTATION_ORIGIN_LOCATION =
  'backstage.io/managed-by-origin-location';

// @public
export const ANNOTATION_SOURCE_LOCATION = 'backstage.io/source-location';

// @public
export const ANNOTATION_VIEW_URL = 'backstage.io/view-url';

// @public
interface ApiEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'API';
  // (undocumented)
  spec: {
    type: string;
    lifecycle: string;
    owner: string;
    definition: string;
    system?: string;
  };
}
export { ApiEntityV1alpha1 as ApiEntity };
export { ApiEntityV1alpha1 };

// @public
export const apiEntityV1alpha1Validator: KindValidator;

// @public
export class CommonValidatorFunctions {
  static isJsonSafe(value: unknown): boolean;
  static isNonEmptyString(value: unknown): value is string;
  static isValidDnsLabel(value: unknown): boolean;
  static isValidDnsSubdomain(value: unknown): boolean;
  static isValidPrefixAndOrSuffix(
    value: unknown,
    separator: string,
    isValidPrefix: (value: string) => boolean,
    isValidSuffix: (value: string) => boolean,
  ): boolean;
  // @deprecated
  static isValidString(value: unknown): boolean;
  // @deprecated
  static isValidTag(value: unknown): boolean;
  static isValidUrl(value: unknown): boolean;
}

// @public
interface ComponentEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'Component';
  // (undocumented)
  spec: {
    type: string;
    lifecycle: string;
    owner: string;
    subcomponentOf?: string;
    providesApis?: string[];
    consumesApis?: string[];
    dependsOn?: string[];
    system?: string;
  };
}
export { ComponentEntityV1alpha1 as ComponentEntity };
export { ComponentEntityV1alpha1 };

// @public
export const componentEntityV1alpha1Validator: KindValidator;

// @public
export type CompoundEntityRef = {
  kind: string;
  namespace: string;
  name: string;
};

// @public
export const DEFAULT_NAMESPACE = 'default';

// @public
export class DefaultNamespaceEntityPolicy implements EntityPolicy {
  constructor(namespace?: string);
  // (undocumented)
  enforce(entity: Entity): Promise<Entity>;
}

// @public
interface DomainEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'Domain';
  // (undocumented)
  spec: {
    owner: string;
  };
}
export { DomainEntityV1alpha1 as DomainEntity };
export { DomainEntityV1alpha1 };

// @public
export const domainEntityV1alpha1Validator: KindValidator;

// @public
export type Entity = {
  apiVersion: string;
  kind: string;
  metadata: EntityMeta;
  spec?: JsonObject;
  relations?: EntityRelation[];
};

// @public
export type EntityEnvelope = {
  apiVersion: string;
  kind: string;
  metadata: {
    name: string;
    namespace?: string;
  };
};

// @public
export function entityEnvelopeSchemaValidator<
  T extends EntityEnvelope = EntityEnvelope,
>(schema?: unknown): (data: unknown) => T;

// @public
export function entityKindSchemaValidator<T extends Entity>(
  schema: unknown,
): (data: unknown) => T | false;

// @public
export type EntityLink = {
  url: string;
  title?: string;
  icon?: string;
  type?: string;
};

// @public
export type EntityMeta = JsonObject & {
  uid?: string;
  etag?: string;
  name: string;
  namespace?: string;
  title?: string;
  description?: string;
  labels?: Record<string, string>;
  annotations?: Record<string, string>;
  tags?: string[];
  links?: EntityLink[];
};

// @public
export const EntityPolicies: {
  allOf(policies: EntityPolicy[]): EntityPolicy;
  oneOf(policies: EntityPolicy[]): EntityPolicy;
};

// @public
export type EntityPolicy = {
  enforce(entity: Entity): Promise<Entity | undefined>;
};

// @public
export type EntityRelation = {
  type: string;
  targetRef: string;
};

// @public
export function entitySchemaValidator<T extends Entity = Entity>(
  schema?: unknown,
): (data: unknown) => T;

// @public
export class FieldFormatEntityPolicy implements EntityPolicy {
  constructor(validators?: Validators);
  // (undocumented)
  enforce(entity: Entity): Promise<Entity>;
}

// @public
export function getCompoundEntityRef(entity: Entity): CompoundEntityRef;

// @public
export function getEntitySourceLocation(entity: Entity): {
  type: string;
  target: string;
};

// @public
export class GroupDefaultParentEntityPolicy implements EntityPolicy {
  constructor(parentEntityRef: string);
  // (undocumented)
  enforce(entity: Entity): Promise<Entity>;
}

// @public
interface GroupEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'Group';
  // (undocumented)
  spec: {
    type: string;
    profile?: {
      displayName?: string;
      email?: string;
      picture?: string;
    };
    parent?: string;
    children: string[];
    members?: string[];
  };
}
export { GroupEntityV1alpha1 as GroupEntity };
export { GroupEntityV1alpha1 };

// @public
export const groupEntityV1alpha1Validator: KindValidator;

// @public (undocumented)
export function isApiEntity(entity: Entity): entity is ApiEntityV1alpha1;

// @public (undocumented)
export function isComponentEntity(
  entity: Entity,
): entity is ComponentEntityV1alpha1;

// @public (undocumented)
export function isDomainEntity(entity: Entity): entity is DomainEntityV1alpha1;

// @public (undocumented)
export function isGroupEntity(entity: Entity): entity is GroupEntityV1alpha1;

// @public (undocumented)
export function isLocationEntity(
  entity: Entity,
): entity is LocationEntityV1alpha1;

// @public (undocumented)
export function isResourceEntity(
  entity: Entity,
): entity is ResourceEntityV1alpha1;

// @public (undocumented)
export function isSystemEntity(entity: Entity): entity is SystemEntityV1alpha1;

// @public (undocumented)
export function isUserEntity(entity: Entity): entity is UserEntityV1alpha1;

// @public
export type KindValidator = {
  check(entity: Entity): Promise<boolean>;
};

// @public
export class KubernetesValidatorFunctions {
  // (undocumented)
  static isValidAnnotationKey(value: unknown): boolean;
  // (undocumented)
  static isValidAnnotationValue(value: unknown): boolean;
  // (undocumented)
  static isValidApiVersion(value: unknown): boolean;
  // (undocumented)
  static isValidKind(value: unknown): boolean;
  // (undocumented)
  static isValidLabelKey(value: unknown): boolean;
  // (undocumented)
  static isValidLabelValue(value: unknown): boolean;
  // (undocumented)
  static isValidNamespace(value: unknown): boolean;
  // (undocumented)
  static isValidObjectName(value: unknown): boolean;
}

// @public
interface LocationEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'Location';
  // (undocumented)
  spec: {
    type?: string;
    target?: string;
    targets?: string[];
    presence?: 'required' | 'optional';
  };
}
export { LocationEntityV1alpha1 as LocationEntity };
export { LocationEntityV1alpha1 };

// @public
export const locationEntityV1alpha1Validator: KindValidator;

// @public
export function makeValidator(overrides?: Partial<Validators>): Validators;

// @public
export class NoForeignRootFieldsEntityPolicy implements EntityPolicy {
  constructor(knownFields?: string[]);
  // (undocumented)
  enforce(entity: Entity): Promise<Entity>;
}

// @public
export function parseEntityRef(
  ref:
    | string
    | {
        kind?: string;
        namespace?: string;
        name: string;
      },
  context?: {
    defaultKind?: string;
    defaultNamespace?: string;
  },
): CompoundEntityRef;

// @public
export function parseLocationRef(ref: string): {
  type: string;
  target: string;
};

// @public
export const RELATION_API_CONSUMED_BY = 'apiConsumedBy';

// @public
export const RELATION_API_PROVIDED_BY = 'apiProvidedBy';

// @public
export const RELATION_CHILD_OF = 'childOf';

// @public
export const RELATION_CONSUMES_API = 'consumesApi';

// @public
export const RELATION_DEPENDENCY_OF = 'dependencyOf';

// @public
export const RELATION_DEPENDS_ON = 'dependsOn';

// @public
export const RELATION_HAS_MEMBER = 'hasMember';

// @public
export const RELATION_HAS_PART = 'hasPart';

// @public
export const RELATION_MEMBER_OF = 'memberOf';

// @public
export const RELATION_OWNED_BY = 'ownedBy';

// @public
export const RELATION_OWNER_OF = 'ownerOf';

// @public
export const RELATION_PARENT_OF = 'parentOf';

// @public
export const RELATION_PART_OF = 'partOf';

// @public
export const RELATION_PROVIDES_API = 'providesApi';

// @public
interface ResourceEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'Resource';
  // (undocumented)
  spec: {
    type: string;
    owner: string;
    dependsOn?: string[];
    dependencyOf?: string[];
    system?: string;
  };
}
export { ResourceEntityV1alpha1 as ResourceEntity };
export { ResourceEntityV1alpha1 };

// @public
export const resourceEntityV1alpha1Validator: KindValidator;

// @public
export class SchemaValidEntityPolicy implements EntityPolicy {
  // (undocumented)
  enforce(entity: Entity): Promise<Entity>;
}

// @public
export function stringifyEntityRef(
  ref:
    | Entity
    | {
        kind: string;
        namespace?: string;
        name: string;
      },
): string;

// @public
export function stringifyLocationRef(ref: {
  type: string;
  target: string;
}): string;

// @public
interface SystemEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'System';
  // (undocumented)
  spec: {
    owner: string;
    domain?: string;
  };
}
export { SystemEntityV1alpha1 as SystemEntity };
export { SystemEntityV1alpha1 };

// @public
export const systemEntityV1alpha1Validator: KindValidator;

// @public
interface UserEntityV1alpha1 extends Entity {
  // (undocumented)
  apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
  // (undocumented)
  kind: 'User';
  // (undocumented)
  spec: {
    profile?: {
      displayName?: string;
      email?: string;
      picture?: string;
    };
    memberOf?: string[];
  };
}
export { UserEntityV1alpha1 as UserEntity };
export { UserEntityV1alpha1 };

// @public
export const userEntityV1alpha1Validator: KindValidator;

// @public
export type Validators = {
  isValidApiVersion(value: unknown): boolean;
  isValidKind(value: unknown): boolean;
  isValidEntityName(value: unknown): boolean;
  isValidNamespace(value: unknown): boolean;
  isValidLabelKey(value: unknown): boolean;
  isValidLabelValue(value: unknown): boolean;
  isValidAnnotationKey(value: unknown): boolean;
  isValidAnnotationValue(value: unknown): boolean;
  isValidTag(value: unknown): boolean;
};
```
